package com.dxx.cloud.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dxx.cloud.admin.module.entity.UserEntity;
import com.dxx.cloud.admin.module.request.MerchantCheckPasswordRequest;
import com.dxx.cloud.admin.module.request.ShopCheckPasswordRequest;
import com.dxx.cloud.admin.module.request.UserListRequest;
import com.dxx.cloud.admin.module.response.UserResponse;

import java.util.List;

/**
 * <p>
 * 用户 Mapper 接口
 * </p>
 *
 * @author dh
 * @since 2025-06-06
 */
public interface UserMapper extends BaseMapper<UserEntity> {


    /**
     * 商户级别的用户
     * @param request
     * @return
     * @throws Exception
     */
    List<UserResponse> merUserList(UserListRequest request);

    /**
     * 查询有门店id的用户
     * @param request
     * @return
     * @throws Exception
     */
    List<UserResponse> shopUserList(UserListRequest request);

    /**
     *根据商户id和密码查询商户用户
     * @param request
     * @return
     * @throws Exception
     */
    UserResponse selectMerByPassword(MerchantCheckPasswordRequest request);

    /**
     * 根据门店id和密码查询门店用户
     * @param request
     * @return
     * @throws Exception
     */
    UserResponse selectShopByPassword(ShopCheckPasswordRequest request);

}
